/**
 * ArrowHead ASP Server 
 * This is a source file for the ArrowHead ASP Server - an 100% Java
 * VBScript interpreter and ASP server.
 *
 * For more information, see http://www.tripi.com/arrowhead
 *
 * Copyright (C) 2002  Terence Haddock
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 */
package com.tripi.asp.parse;

import com.tripi.asp.AspContext;
import com.tripi.asp.AspException;
import java.io.InputStream;
import java.io.Reader;
import java.io.Serializable;

/**
 * This interface defines a file factory class, a class which can
 * obtain input streams from a file source.
 */
public interface FileFactory
{
    /**
     * Resolves a relative file based on a base file
     * @param context Asp context
     * @param baseFile base file, null means no base file
     * @param relFile relative file
     * @param virtual Is this a virtual reference?
     */
    public String resolveFile(String baseFile, String relFile, boolean virtual)
        throws AspException;

    /** 
     * Get the defined resource.
     * @param filename filename or URL
     */
    public Reader getResource(String filename)
        throws AspException;
}
